
$(document).ready(function(){ 
alert("loaded");
	//attach a jQuery live event to the button
	$('#getdata-button').live('click', function(){
                                //alert("clicked");
		$.ajax({
			url: '2.jsp',
			dataType: 'json',
			data:'json',
			
			success: function(json){
                               // alert("success");
				alert(json); //uncomment this for debug
				alert (json.item1+" "+json.item2); //further debug
				$('#showdata').html("<p>item1="+json.item1+" item2="+json.item2+"</p>");
			}
          });
	
	
	
       });
   });
